﻿using System;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using IniTechCaash.Domain.Entities;
using IniTechCaash.Domain.EntityFramework;
using IniTechCaash.WebApplication.Models;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace IniTechCaash.WebApplication.Controllers
{
    public class ActivityLogController : Controller
    {
        private CaashContext db;

        public ActivityLogController()
        {
            db = new CaashContext();
        }

        [Authorize(Roles = "Admin, Manager, User")]
        public ActionResult Index()
        {
            var logs = db.ActivityLogs.OrderByDescending(al => al.LogDate).ToList();

            return View(logs);
        }
	}
}